﻿using System.Collections.Generic;

namespace Twitter
{
	/// <summary>
	/// Exposes operations related to the users' direct messages.
	/// </summary>
	public interface IMessages : IHideObjectMembers
	{
		/// <summary>
		/// Deletes the message with the given <paramref name="messageId"/>.
		/// </summary>
		/// <returns><see langword="true"/> if the message could be deleted; <see langword="false"/> otherwise.</returns>
		bool Delete(string messageId);
		/// <summary>
		/// Retrieves the direct messages sent to the authenticated user, with 
		/// older messages appearing first unlike twitter API.
		/// </summary>
		IEnumerable<Message> GetAll();
		/// <summary>
		/// Sends a direct message to the user with the given 
		/// <paramref name="screenName"/>.
		/// </summary>
		Message Send(string screenName, string message);
		/// <summary>
		/// Retrieves the latest direct message sent to the authenticated 
		/// user.
		/// </summary>
		/// <returns><see langword="null"/> if no messages were found; the latest message otherwise.</returns>
		Message GetLatest();
	}
}
